@echo off
echo Starting MCP Forwarder...

REM 检查Go是否安装
go version >nul 2>&1
if %errorlevel% neq 0 (
    echo Error: Go is not installed or not in PATH
    pause
    exit /b 1
)

REM 检查依赖
if not exist "go.mod" (
    echo Error: go.mod not found, please run in project root
    pause
    exit /b 1
)

REM 安装依赖
echo Installing dependencies...
go mod tidy

REM 创建数据目录
if not exist "data" mkdir data

REM 启动服务器
echo Starting server on http://localhost:8080
go run cmd/server/main.go

pause